<!--

    Copyright (c) 2015 Codenvy, S.A.
    All rights reserved. This program and the accompanying materials
    are made available under the terms of the Eclipse Public License v1.0
    which accompanies this distribution, and is available at
    http://www.eclipse.org/legal/epl-v10.html

    Contributors:
      Codenvy, S.A. - initial API and implementation

-->
<md-content flex class="create-project-workspace-list">
  <div ng-show="createProjectWorkspacesController.workspaces.length">
    <che-list class="samples-list">
      <che-list-item ng-repeat="workspace in createProjectWorkspacesController.workspaces"
                     ng-init="$first && createProjectWorkspacesController.onWorkspaceSelect(createProjectWorkspacesController.workspace ? createProjectWorkspacesController.workspace : workspace)"
                     flex>
        <div layout-gt-sm="row" flex layout-align="start center">
          <div class="list-item"
               ng-class="{'list-item-active' : createProjectWorkspacesController.workspace.id === workspace.id}"
               ng-click="createProjectWorkspacesController.onWorkspaceSelect(workspace)" layout="column" flex>
            <div class="list-item-name">{{workspace.config.name}}</div>
            <div ng-show="workspace.attributes && workspace.attributes.stackId" class="list-item-description">
              {{workspace.attributes.stackId}} stack
            </div>
          </div>
        </div>
      </che-list-item>
    </che-list>
  </div>
  <div ng-show="!createProjectWorkspacesController.workspaces.length" class="list-empty">
    - No workspaces inside
  </div>
</md-content>
